package com.credithc.signature.core;

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

/**
 * @desc: <br/>
 * @author: Jingbo Hu<br/>
 * @time：2021年02⽉08⽇<br/>
 * @version：v1.0.0<br>
 */
public class ParallelStreamExeception {

    public static void main(String[] args) {
        check();
    }

    public static void check(){
        List<Integer> list = IntStream.rangeClosed(1, 10).boxed().collect(Collectors.toList());
        System.out.println(Runtime.getRuntime().availableProcessors());
        list.parallelStream().forEach(a -> {
            System.out.println(a);
            throw new RuntimeException("印章申请信息（证件类型-证件号-印章标识）重复");
        });
    }
}
